diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-09-28 14:58:12 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-09-28 14:58:12 +0100 |
| commit | a637fcc83f642d5320608ea7fc20a93f3ec5ab86 (patch) | |
| tree | 7d32340746ba7e053250c5ae8fd24f4f6c990f9e /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefiineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | |
| parent | 81a8685983e718f087319de8f1b27c059bbcf283 (diff) | |
Generate Patio code for defining structs
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefiineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
1 files changed, 49 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefiineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefiineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..c7b77936 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefiineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,49 @@ +Compilation unit elements: + +( + function + "shed__function__User__0" + visibility=private + locals=((param "closurePointer__0" data-ptr) (param "local__isActive" int) (param "local__name" int) (val "structValuePointer__0" data-ptr) (val "structValue__0" int)) + return-type=int + body=( + (alloc-heap (local "structValuePointer__0") (struct (int int))) + ( + memory-store + pointer=(local "structValuePointer__0") + layout=(struct (int int)) + offset=(0) + value=(local "local__name") + ) + ( + memory-store + pointer=(local "structValuePointer__0") + layout=(struct (int int)) + offset=(1) + value=(local "local__isActive") + ) + (data-ptr-to-int (local "structValue__0") (local "structValuePointer__0")) + (return (local "structValue__0")) + ) +) + +Locals: + * (val "structType__User__0" int) + * (val "closurePointer__User__0" data-ptr) + +Instructions: + +( + (alloc-heap (local "closurePointer__User__0") (struct (function-ptr (struct ())))) + ( + memory-store + pointer=(local "closurePointer__User__0") + layout=(struct (function-ptr (struct ()))) + offset=(0) + value=(function-ptr "shed__function__User__0") + ) + (data-ptr-to-int (local "structType__User__0") (local "closurePointer__User__0")) +) + +Temporary stack: + * structType__User__0 |
